@abstract 
class_name Component
extends Node
signal enable_changed(enable:bool)
@export var host:Node
@export var enable:bool=true:
	set(value):
		if enable==value:return
		enable=value
		if not is_node_ready():await ready
		if not host.is_node_ready():await host.ready
		if enable:_enable()
		else:_disable()
		enable_changed.emit(enable)
@abstract func _enable()->void
@abstract func _disable()->void
func _enter_tree() -> void:
	assert(host)
	if not is_node_ready():await ready
	if not host.is_node_ready():await host.ready
	if enable:_enable()
